#pragma once

#include "dynmdm.h"


class CDynDocManager : public CDocManager
{
    DECLARE_DYNAMIC(CDynDocManager)
public:
    CDynDocManager();
    virtual ~CDynDocManager();
    BOOL    CreateNewDocument(int doc_index);
    int        GetMyDocumentCount();
    void OnFileNew();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
};


class dllwrapper
{
public:
    dllwrapper(CString filename = _T("")) ;    // constructor
    ~dllwrapper() ;                    // destructor

    bool        LoadDLL(CString filename) ;
    bool        FreeDLL() ;
    // member vars
    CString            m_filename;        // filename of DLL
    HINSTANCE        m_DLLhInstance ;// pointer to Instance of DLL

    // function pointers
    // document template support
    DLLDOCTEMPLATE        DLLDocumentTemplate ;

} ;


class dynmdi
{
public:
    int            m_number_of_dlls ;        // number loaded
    dllwrapper    *m_LoadedDLLs ;            // pointer to objects
    int            LoadDLLs(void);
    int            RegisterDocTemplates(void) ;

    dynmdi(void);
    ~dynmdi(void);

    void LoadMenu(void);
    void UnloadMenu(void);
};

